package com.txunda.zhuohired.adapter.user.my;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.txunda.zhuohired.R;

/**
 * 创建人： Txd_Cjh
 * 创建时间： 2018/3/9 9:59
 * 功能描述：地图详情(选点)adapter
 * 联系方式：jiahuanchen@126.com
 */

public class LocationSelectAdapter extends BaseAdapter {
    private Context context;
    private ViewHolder holder;

    public LocationSelectAdapter(Context context) {
        this.context = context;
    }

    @Override
    public int getCount() {
        return 4;
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        if (view == null) {
            view = LayoutInflater.from(context).inflate(R.layout.item_location_select, null);
            holder = new ViewHolder();
            view.setTag(holder);
            ViewUtils.inject(holder, view);
        } else {
            holder = (ViewHolder) view.getTag();
        }
        return view;
    }

    class ViewHolder {
        /**
         * 确认选点
         */
        @ViewInject(R.id.tv_item_location_select_true)
        private TextView tv_item_location_select_true;
    }
}
